package may.test_5_29;

import java.util.Scanner;

public class TestMain3 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        int m = scanner.nextInt();
        int q = scanner.nextInt();
        int[][] dp = new int[n][n];
        for (int i = 0; i < m; i++) {
            int a = scanner.nextInt();
            int b = scanner.nextInt();
            dp[a - 1][b - 1] = 1;
        }
        for (int i = 0; i < q; i++) {
            int k = scanner.nextInt();
            int a = scanner.nextInt();
            int b = scanner.nextInt();
            if(k == 1) {
                dp[a - 1][b - 1] = 0;
            }
            if(k == 2) {
                boolean tmp = true;
                for (int j = 0; j < n; j++) {
                    if((dp[j][a - 1] == 1 && dp[j][b - 1] == 1)
                            || (dp[a - 1][j] == 1 && dp[b - 1][j] == 1)
                            || (dp[a - 1][j] == 1 && dp[j][b - 1] == 1)
                            || (dp[j][a - 1] == 1 && dp[b - 1][j] == 1)) {
                        dp[a - 1][b - 1] = 1;
                        System.out.println("Yes");
                        tmp = false;
                        break;
                    }
                }
                if (tmp) {
                    System.out.println("No");
                }
            }
        }
    }
    private static boolean friend(int[][] dp,int a,int b) {
        return true;
    }
}
